<template>
  <div>
    <h1>这里有个郭靖</h1>
    <ul class="mui-table-view" >
      <li class="mui-table-view-cell mui-media" v-for="item in fsafsafsafsa" :key="item.id">
        <router-link :to="'/home/newss/'+item.id">
          <img class="mui-media-object mui-pull-left" :src="item.img_url" />
          <div class="mui-media-body">
          {{item.title}}
            <p class="mui-ellipsis">时间：{{item.add_time|dateFormat}} 点击{{item.click}}次</p>
          </div>
        </router-link>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  data() {
    return {
      fsafsafsafsa: []
    };
  },
  created() {
    this.gertdfd();
  },
  methods: {
    gertdfd() {
      this.$http
        .get("http://www.liulongbin.top:3005/api/getnewslist")
        .then(result => {
          console.log(result.body);
          if (result.body.status === 0) {
            this.fsafsafsafsa = result.body.message;
          }else{
              console.log(请求不合格);
              
          }
        });
    }
  }
};
</script>
<style lang="less" scoped>
.mui-media-body{
    font-size: 13px
}
</style>
